﻿{include file="Public/public" /}
<body>
 <div class="wrap">
  <div class="page-title">
    <span class="modular fl"><i class="user"></i><em>会员列表</em></span>
    <span class="modular fr"><a href="/adminliwu/add_liwu/" class="pt-link-btn">+添加礼物</a></span>
  </div>
  
  <table class="list-style Interlaced">
   <tr>
     <th>编号</th>
     <th>名称</th>
     <th>缩略图</th>
     <th>价格</th>
     <th>折扣</th>
     <th>操作</th>
   </tr>
   {foreach name="arr" item="row"}
   <tr>
    <td class="center pic-area">
     {$row.id}
    </td>
    
    <td class="center pic-area">{$row.name}</td>
    <td class="center pic-area"><img src="/uploads/{$row['pic']}" class="thumbnail"/></td>
    <td class="center pic-area">{$row.price}</td>
    <td class="center pic-area">{$row.discount}</td>
    <td class="center pic-area">
     <a href="/adminliwu/edit_liwu/id/{$row.id}" class="inline-block" title="礼物详情"><img src="/static/admin/mo/images/icon_edit.gif"/></a>
     <!-- <a href="/adminmember/account/id/{$row.id}" class="inline-block" title="资金管理"><img src="/static/admin/mo/images/icon_account.gif"/></a> -->
     <a class="inline-block delliwu" id="{$row['id']}" title="删除"><img src="/static/admin/mo/images/icon_drop.gif"/></a>
    </td>
   </tr>
   {/foreach}
  </table>
  <!-- BatchOperation -->
  <div style="overflow:hidden;">
      <!-- Operation -->
	  
	  <style>
  .turnPage li{
    display: inline-block;
  }
.turnPage li span{
    
    
    padding: 5px 10px;
    cursor: pointer;
    background: #96aecd;
    color: #fff;
}
.turnPage .active span{
background: #1F6FD6;
}
  </style>
    <!-- turn page -->
    <div class="turnPage center fr">
    {$arr->appends($request)->render()}
    </div>
  </div>
 </div>
</body>
</html>
<script> 
  $(".delliwu").click(function(){
    var id = $(this).attr('id');
    $.get("/adminliwu/delete",{id:id},function(data){
     
      if(data==1){
        alert('已删除');
        location.href="/adminliwu/index";
      }else{
        alert('删除失败');
        location.href="/adminliwu/index";
      }
    })
  })
</script>